package com.sky.aop;


import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LoggingAspect {
    @Before("execution(* com.sky.aop.AOPService.doSomething(..))")
    public void logBefore() {
        System.out.println("Before executing AOPService.doSomething()");
    }

    @After("execution(* com.sky.aop.AOPService.doSomething(..))")
    public void logAfter() {
        System.out.println("After executing AOPService.doSomething()");
    }
}
